# -*- coding:utf-8 -*-

# D&C (divide and conquer)


class Farmland:
    def __init__(self, long=0, width=0):
        self.long = long
        self.width = width

    def cal_min_land(self):
        max_line = max(self.width, self.long)
        min_line = min(self.width, self.long)
        if max_line % min_line == 0:  # 基线 可以被整除
            return min_line
        else:
            last_line = max_line - min_line
            return Farmland(long=last_line, width=min_line).cal_min_land()


print('最大化均分土地块边长为{a}x{a}'.format(a=Farmland(long=1680, width=640).cal_min_land()))
